package www.baidu;

public class AccountSet {
    private String name;
    private double balance;
    private String pwd;


    public AccountSet(String name, double balance, String pwd) {
        this.name = name;
        this.balance = balance;
        this.pwd = pwd;
        setName(name);
        setBalance(balance);
        setPwd(pwd);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        if(name.length()>=2&&name.length()<=4)
        this.name = name;
        else {
            System.out.println("姓名异常");
            this.name= "姓名异常";
        }
    }

    public double getBalance() {
        return balance;
    }

    public void setBalance(double balance) {
        this.balance = balance;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }
    public String flot(){
       return name+"  "+balance+"  "+pwd;
    }
}
